
/* 4.Object.set PrototypeOf（obj1，obj2）用于设置某个对象的隐式原型 */

const obj1 = {
    a: 1
}

const obj2 = {
    b: 2
}

// obj1.__proto__ = obj2
Object.setPrototypeOf(obj1, obj2)

console.log(obj1.b);
